<?php defined('SYSPATH') or die('No direct script access.');
class goods
{
    private static $_instance='';
    
    function __construct() {
    }
    
    static function test()
    {
        return  '<Br><br>------class static test---------<br><br>';
    }
    function detail()
    {
        echo   '<Br><br>------new class---------<br><br>';
    }
    
        /**
         * 单例类
         * @return type
         */
        public static function factory()
        {
            if(!(self::$_instance instanceof self))
	        {
	              self::$_instance = new self();
            }
            return self::$_instance;
       }

}
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
?>
